
#ifndef BNETPACKETPARSER_H
#define BNETPACKETPARSER_H

#include <qcstring.h>

#include "BnetMessage.h"


class BnetPacketParser
{
 public:
    // Turns QByteArray into BnetMessage.
    BnetMessage parsePacket( const QByteArray& arr );
 private:
    // Checks if the friend joined the game.  If yes, then change the BnetMessage type, and sets the gameName.
    bool checkIfFriendJoinedGame( BnetMessage &msg );
    QString BnetPacketParser::fromUtf8toQString( QDataStream& stream );
};

#endif
